var app = getApp();

// pages/homepage/tifen/tifen.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    getResource:[],
    bannerimage: []
  },
  onLoad: function (options) {
    var that = this;

    // 加载banner图片

    wx.request({
      url: app.d.ceshiUrl + '/public/index.php/api/get_banner',
      data: {
        category: '定向提分'
      },
      success: function (res) {
        that.setData({
          bannerimage: res.data.data
        })
      },
      fail: function (e) {
        app.errorToast()
      }
    })

    // 加载数据

    wx.request({
      url: 'https://jiaoyu.mogochina.com/public/index.php/api/get_category',
      data: {
        ident: 'direction'
      },
      success: function (res) {
        that.setData({
          getResource: res.data.data
        })
      }
    })
  }
})